<template>
  <div>
    <Edit mode="edit" />
  </div>
</template>

<script>
import Edit from "@/components/Edit/index.vue";

export default {
  components: {
    Edit
  },
  created() {
    // 获取当前的刷新次数
    let refreshCount = sessionStorage.getItem('refreshCount') || 0;

    // 如果刷新次数小于2，则增加刷新次数
    refreshCount++;
    sessionStorage.setItem('refreshCount', refreshCount);
    if (refreshCount > 1) {
      this.$message.error('内容已被重置，请重新选择')
      this.$router.push('blogList')
      sessionStorage.setItem('refreshCount', 0)
    }
  }
}
</script>

<style lang="scss" scoped></style>
